using System;
using System.Collections;
using MySql.Data.MySqlClient;


namespace ScenarioFramework.Modules.DM.DataModel
{
	/// <summary>
	/// Descrizione di riepilogo per XMLAttributesHelper.
	/// </summary>
	public class XMLAttributesHelper : ScenarioFramework.WorkflowEngine.DataModel.WorkflowRelevantData.XMLAttributes,  bOS.DataBase.bOSTable
	{
		private string sDocId;
		private string sVersion;
		
		public XMLAttributesHelper () 
		{
		}
		public XMLAttributesHelper(string docId,string ver)
		{
			this.sDocId=docId;
			this.sVersion=ver;
        }

				
		public void ReadFromDataBase( MySqlDataReader reader)
		{
			
			ScenarioFramework.WorkflowEngine.DataModel.WorkflowRelevantData.XMLAttribute xmlAtt= new ScenarioFramework.WorkflowEngine.DataModel.WorkflowRelevantData.XMLAttribute();
			while (reader.Read() ) 
			{
				xmlAtt.Name= reader.GetValue(0).ToString();
				xmlAtt.Direction= reader.GetValue(1).ToString(); 
				xmlAtt.Type= reader.GetValue(2).ToString(); 
				xmlAtt.Value= reader.GetValue(3).ToString(); 
				this.AddAttribute(xmlAtt);
				//this.AddAttribute ( "DocumentStorage", reader.GetString (10));
			}
		}

		
	}
}
